package com.gitee.minimalismstyle.fresh.common.core.domain

class Simple : LinkedHashMap<String, Any?>() {

    fun getInt(key: String): Int?{
        return if(this.containsKey(key)){
            this[key] as Int
        }else{
            null
        }

    }

    fun getString(key: String): String?{
        return if(this.containsKey(key)){
            this[key].toString()
        }else{
            null
        }

    }

    fun getString(key: String, defaultValue: String): String{
        return if(this.containsKey(key)){
            this[key].toString()
        }else{
            defaultValue
        }

    }
}